import type { BlogCommentWebVO} from "~/api/comment/types";

/**
 * 文章查询参数
 */
export interface ArticleQuery extends PageQuery {
    tagIds?: string | number[];
    categoryId?: string | number;
    keyword?: string;
}

export interface BlogArticleSearchWebVO {
    articleId: string | number;
    articleTitle: string;
    articleContent: string;
}

export interface BlogArticleWebVO {
    articleId: string | number;
    articleTitle: string;
    articleImage: string;
    tags: string[];
    categoryName: string;
    isTop: number;
    isLiked: boolean;
    createBy: string;
    avatar: string;
    viewedCount: number;
    likedCount: number;
    createTime: string;
}

export interface BlogArticleDetailWebVO {
    articleId: string | number;
    articleTitle: string;
    articleContent: string;
    articleImage: string;
    articleType: string;
    originalUrl: string;
    tags: string[];
    categoryName: string;
    createBy: string;
    authorId: string | number;
    avatar: string;
    isLiked: boolean;
    blogCommentWebVoList: BlogCommentWebVO[];
    viewedCount: number;
    likedCount: number;
    commentedCount: number;
    createTime: string;
}
export interface BlogArticleArchiveWebVo {
    articleId: string | number;
    articleTitle: string;
    createTime: string;
}

export interface ArchiveGroupYearWebVo {
    year: number;
    archiveMap: { [month: string]: BlogArticleArchiveWebVo[] };
}
